home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
moni
/
Scout.lha
/
Scout
/
arexx
/
settaskpri.scout
< prev
next >
Wrap
Text File
|
1996-02-16
|
900b
|
39 lines
/**************************************************************************
* This ARexx script sets the priority of task <taskname> to <priority>. *
* USAGE: settaskpri <taskname> <priority> *
**************************************************************************/
if showlist('p','SCOUT.1') < 1 then do
say "Scout is not running!"
exit
end
address 'SCOUT.1'
parse arg taskname priority
options results
options failat 20
if (taskname = '') + (priority = '') > 0 then do
say "usage: settaskpri <taskname> <priority>"
exit
end
FindTask taskname
taskaddress = result
if taskaddress = 'RESULT' then do
say "Can't find task '" || taskname || "'!"
exit
end
GetPriority taskaddress
oldpri = result
if oldpri = priority then do
say "Task '" || taskname || "' already has priority " || priority || "!"
exit
end
SetTaskPri taskname priority
exit